package com.zhijian.warehouse.manage.dao;

import com.zhijian.warehouse.manage.entity.export.StoreOutRecordExport;
import com.zhijian.warehouse.manage.entity.po.StoreOutRecord;
import com.zhijian.warehouse.manage.entity.vo.request.StoreOutRecordSearchVo;
import com.zhijian.warehouse.manage.entity.vo.response.StoreOutRecordVo;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface StoreOutRecordMapper {
    int deleteByPrimaryKey(Long id);

    int insert(StoreOutRecord record);

    int insertSelective(StoreOutRecord record);

    StoreOutRecord selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(StoreOutRecord record);

    int updateByPrimaryKey(StoreOutRecord record);

    /**
     * 查询总数
     *
     * @param storeOutRecordSearchVo
     * @return
     */
    int count(StoreOutRecordSearchVo storeOutRecordSearchVo);

    /**
     * 查询列表
     *
     * @param storeOutRecordSearchVo
     * @return
     */
    List<StoreOutRecordVo> selectList(StoreOutRecordSearchVo storeOutRecordSearchVo);

    /**
     * 查询单个
     *
     * @param storeOutRecordSearchVo
     * @return
     */
    StoreOutRecordVo selectOne(StoreOutRecordSearchVo storeOutRecordSearchVo);

    /**
     * 根据ID查询vo
     *
     * @param id
     * @return
     */
    StoreOutRecordVo selectVoById(Long id);

    /**
     * 批量删除
     *
     * @param idList
     * @return
     */
    void deleteByIdList(@Param("idList") List<Long> idList);

    /**
     * 动态删除
     *
     * @param storeOutRecordSearchVo
     * @return
     */
    void deleteByCondition(StoreOutRecordSearchVo storeOutRecordSearchVo);

    /**
     * 批量新增
     *
     * @param entities
     * @return
     */
    int insertBatch(@Param("entities") List<StoreOutRecord> entities);

    /**
     * 根据WarehouseId查询列表
     *
     * @param warehouseId
     * @return
     */
    List<StoreOutRecordVo> selectListByWarehouseId(Long warehouseId);

    /**
     * 根据CreateUserId查询列表
     *
     * @param createUserId
     * @return
     */
    List<StoreOutRecordVo> selectListByCreateUserId(Long createUserId);

    /**
     * 根据UpdateUserId查询列表
     *
     * @param updateUserId
     * @return
     */
    List<StoreOutRecordVo> selectListByUpdateUserId(Long updateUserId);

    /**
     * 查询出某天最新数据的number
     *
     * @param day
     * @return
     */
    String selectMaxNumberByDay(String day);

    /**
     *
     * @param param
     * @return
     */
    List<StoreOutRecordExport> selectStoreOutExportList(StoreOutRecordSearchVo param);
}
